import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app/ui/share_page.dart';

class SharePageFirst extends StatelessWidget {
  const SharePageFirst({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("共享元素动画"),
      ),
      body: Column(
        children: [
          InkWell(
            child: Hero(
                tag: "imgShare",
                child: Image.network(
                  "https://www.wanandroid.com/blogimgs/50c115c2-cf6c-4802-aa7b-a4334de444cd.png",
                  width: 80,
                  height: 80,
                )),
            onTap: () {
              Navigator.pushNamed(context, "sharePage");
              // Navigator.push(context, MaterialPageRoute(builder: (_) {return const SharePage();}));
            },
          ),
          Hero(
              tag: "imgShare2",
              child: Image.network(
                "https://www.wanandroid.com/blogimgs/50c115c2-cf6c-4802-aa7b-a4334de444cd.png",
                width: 80,
                height: 80,
              ))
        ],
      ),
    );
  }
}
